//
//  TypeScrollView.m
//  QuickCure
//
//  Created by 王震 on 16/9/12.
//  Copyright © 2016年 haoge. All rights reserved.
//

#import "TypeScrollView.h"
#import "OneTypeView.h"

@implementation TypeScrollView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/



-(instancetype)init{
    if (self = [super init]) {
        [self creatSubViews];
    }
    return self;
}

-(void)creatSubViews{
    self.backgroundColor = [UIColor blackColor];
    
   
    
    NSArray *titleArr = @[@"肿瘤",@"心血管",@"神经病",@"血液科",@"骨科",@"公益"];
    
    CGFloat margin = 2;
    CGFloat kWidth = (self.bounds.size.width - (titleArr.count + 1) * margin) / titleArr.count;
    for (int i = 0; i < titleArr.count; i ++) {
        
        OneTypeView *typeView = [OneTypeView oneTypeViewWithTitle:@"aa" image:[UIImage imageNamed:@"home00"]];
        typeView.frame = CGRectMake(0, 10, 100, 100);
        [self addSubview:typeView];
        
    }

}
@end
